package thinkingInJava.nesting;

// 多层嵌套类可以访问所有外部类所有成员
class MNA {
	  private void f() {}
	  class A {
	    private void g() {}
	    public class B {
	      void h() {
	        g();	// MNA.A.g
	        f();	// MNA.f
	      }
	    }
	  }
	}	

	public class MultiNestingAccess {
	  public static void main(String[] args) {
	    MNA mna = new MNA();
	    MNA.A mnaa = mna.new A();
	    MNA.A.B mnaab = mnaa.new B();
	    mnaab.h();
	  }
	} ///:~
